package com.sbtr.business.calibration.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sbtr.business.classify.entity.Classify;
import com.sbtr.business.calibration.entity.CalibrationObjectDetection;
import com.sbtr.open.calibration.dto.CalibrationImgDetectDto;
import com.sbtr.open.calibration.dto.CalibrationSearchByDetailsDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CalibrationObjectDetectionMapper extends BaseMapper<CalibrationObjectDetection> {


    //List<CalibrationObjectDetection> queryByPicId(@Param("calibrationId")String calibrationId, String picId);


    List<CalibrationImgDetectDto> queryPicByLabelId(@Param("classifyId")String classifyId);


    List<Classify> loadImgDetectCalibrationAllLabels(@Param("calibrationDetailsId")Long calibrationDetailsId);

    //分页查询物体检查（子任务）的素材列表
    List<CalibrationImgDetectDto> getImgDetectList(IPage<CalibrationImgDetectDto> page, @Param("body") CalibrationSearchByDetailsDto body);

    //子任务下已打标签的图片数（已完成状态）
    long getCompletedCountByCalibrationDetailId(@Param("calibrationDetailId")long calibrationDetailId);

    //主任务下已打标签的图片数（已完成状态）
    long getCompletedCountByCalibrationId(@Param("calibrationId")long calibrationId);

    //子任务下，已经打了多少个标签
    long getClassifyCountByCalibrationDetailId(@Param("calibrationDetailId")long calibrationDetailId);

    //主任务下，已经打了多少个标签
    long getClassifyCountByCalibrationId(@Param("calibrationId")long calibrationId);
}
